package com.ship.system.api.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ship.common.core.annotation.Excel;
import com.ship.common.core.annotation.Excel.ColumnType;
import com.ship.common.core.annotation.Excel.Type;
import com.ship.common.core.annotation.Excels;
import com.ship.common.core.base.BaseBean;
import com.ship.common.core.base.Joinable;
import com.ship.common.core.base.PageBean;
import com.ship.common.core.web.domain.BaseEntity;
import com.ship.common.core.xss.Xss;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.util.Date;
import java.util.List;

/**
 * 用户对象 sys_user
 * 
 * @author zhangyh
 */
@Data
@TableName(value = "sys_user")
public class SysUserNew extends PageBean implements Joinable
{
    /** 用户ID */
    private Long userId;

    /** 用户ID查询 */
    @TableField(exist = false)
    private String userIdListForSearch;

    /** 部门ID */
    private Long deptId;

    /** 部门ID查询 */
    @TableField(exist = false)
    private String deptIdListForSearch;

    /** 用户名或名称模糊查询 */
    @TableField(exist = false)
    private String userOrNickNameSearch;

    /** 是否超级管理员 */
    @TableField(exist = false)
    private Boolean isAdmin;

    /** 用户账号 */
    @Excel(name = "用户名")
    private String userName;

    /** 用户昵称 */
    @Excel(name = "姓名")
    private String nickName;

    /** token刷新状态（0：未刷新，1：已刷新） */
    private String refreshStatus;

    /** 岗位名称 */
    @TableField(exist = false)
    @Excel(name = "岗位名称")
    private String postName;

    /** 部门名称 */
    @TableField(exist = false)
    @Excel(name = "部门名称")
    private String deptName;

    private String userType;

    /** 手机号码 */
    @Excel(name = "联系电话")
    private String phonenumber;

    /** 用户邮箱 */
    @Excel(name = "电子邮箱")
    private String email;

    /** 帐号状态（0正常 1停用） */
    @Excel(name = "状态", readConverterExp = "0=启用,1=停用")
    private String status;

    /** 备注 */
    @Excel(name = "备注")
    private String remark;

    /** 更新者 */
    @Excel(name = "操作人")
    private String updateBy;

    /** 更新时间 */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    /** 创建者 */
    private String createBy;

    /** 创建时间 */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @Excel(name = "操作时间")
    @TableField(exist = false)
    private String updateTimeFormat;

    /** 用户性别 */
    private String sex;

    /** 用户头像 */
    private String avatar;

    /** 密码 */
    private String password;

    /** 用户ID查询 */
    @TableField(exist = false)
    private String statusListForSearch;

    /** 删除标志（0代表存在 2代表删除） */
    private String delFlag;

    /** 最后登录IP */
    private String loginIp;

    /** 最后登录时间 */
    private Date loginDate;

    /**
     * 导出列表
     */
    @TableField(exist = false)
    private List<Long> ids;

    @Override
    public String getLabel() {
        return null;
    }

    @Override
    public String getValue() {
        return null;
    }

}
